package com.lee.boot.head.first.demo.annotation;

import com.lee.boot.head.first.demo.annotation.annotationImpl.SexValidateClass;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Auther: Lee
 * @Date: 2018/6/28 12:30
 * @Description:
 */
@Documented
@Target(value = ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = SexValidateClass.class)
public @interface SexValidate {
    //    sex的有效值
    String value();

    String message() default "变性人不支持哦";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
